package cn.fz.luck.saas.util;

import org.springframework.beans.BeanUtils;

/**
 * Created by zhuangqi on 17-7-6.
 */
public class DTOConvert{


    public static <T,E> T change(Class<T> clazz, E forward) {
        try {
            T beforward = clazz.newInstance();
            BeanUtils.copyProperties(forward,beforward);
            return beforward;
        } catch (InstantiationException e) {
            e.printStackTrace();
        } catch (IllegalAccessException e) {
            e.printStackTrace();
        }
        return null;
    }





}
